package joth

import "sync"

type RWLocker struct {
	locker *sync.RWMutex
}

func NewRWLocker() *RWLocker {
	return &RWLocker{
		locker: new(sync.RWMutex),
	}
}

func (l *RWLocker) Lock() {
	l.locker.Lock()
}

func (l *RWLocker) Unlock() {
	l.locker.Unlock()
}

func (l *RWLocker) RLock() {
	l.locker.RLock()
}

func (l *RWLocker) RUnlock() {
	l.locker.RUnlock()
}
